export default{
	namespaced: true,
	state: {
		isLogin: !!uni.getStorageSync('token'),	// 是否登录
		token: uni.getStorageSync('token') || '',
		userId: uni.getStorageSync('userId') || ''
	},
	mutations: {
		// 更改登录状态
		SET_LOGIN(state, data){
			state.isLogin = data;
		},
		SET_TOKEN(state, data){
			state.token = data
			uni.setStorageSync('token', data)
		},
		SET_USERID(state, data){
			state.userId = data
			uni.setStorageSync('userId', data)
		}
	},
	actions: {
		
	}
}